package com.java.jyy.service.impl;

import java.util.Set;

import com.java.common.pojo.Dept;
import com.java.common.pojo.Emp;
import com.java.jyy.dao.TestDao;
import com.java.jyy.service.TestService;

public class TestServiceImpl implements TestService {

	private TestDao tDao;
	public void test1(String username) {
		System.out.println("TestServiceImpl.test1("+username+")");
		Dept dept = tDao.getDept(username);
		if(dept!=null){
			System.out.println("	"+dept.getName());
		} else {
			System.out.println("	"+dept);
		}
	}

	public void test2(String username) {
		System.out.println("TestServiceImpl.test2("+username+")");
		Set<Emp> emps = tDao.getEmps(username);
		for(Emp e : emps){
			System.out.println("	"+e.getEmpId());
		}
	}

	public boolean test3(String username, String password) {
		boolean b = false;
		System.out.println("TestServiceImpl.test3("+username+","+password+")");
		b = tDao.test(username, password);
		return b;
	}

	public void setTDao(TestDao tDao) {
		this.tDao = tDao;
	}
}
